package com.lei.mvp_retrofitlibrary.http.factory;

import com.lei.mvp_retrofitlibrary.http.product.BaseRetrofitProduct;

/**
 * @ProjectName : YoHuo001Java
 * @Author : 雷金泷
 * @Time : 2020/12/13 19:27
 * @Description : 文件描述
 */
public class BaseRetrofitFactory implements IRetrofitFactory {
    private static BaseRetrofitFactory instance = new BaseRetrofitFactory();
    private static BaseRetrofitProduct product = new BaseRetrofitProduct();
    public static  <T> T create(Class<T> service){
        return instance.createRetrofit().getRetrofit().create(service);
    }
    @Override
    public BaseRetrofitProduct createRetrofit() {
        return product;
    }
}
